home *** CD-ROM | disk | FTP | other *** search
/ Delphi 5 for Professionals / DELPHI5.iso / AddOns / Components / Cell Control / DATA1.CAB / VCDEMO_Files / SizeDlg.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-01-11  |  1.7 KB  |  75 lines

  1. // SizeDlg.cpp : implementation file
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "VCDemo.h"
  6. #include "SizeDlg.h"
  7.  
  8. #ifdef _DEBUG
  9. #define new DEBUG_NEW
  10. #undef THIS_FILE
  11. static char THIS_FILE[] = __FILE__;
  12. #endif
  13.  
  14. /////////////////////////////////////////////////////////////////////////////
  15. // CSizeDlg dialog
  16.  
  17.  
  18. CSizeDlg::CSizeDlg(CWnd* pParent /*=NULL*/)
  19.     : CDialog(CSizeDlg::IDD, pParent)
  20. {
  21.     //{{AFX_DATA_INIT(CSizeDlg)
  22.     m_multicol = TRUE;
  23.     m_sizecell = TRUE;
  24.     //}}AFX_DATA_INIT
  25. }
  26.  
  27.  
  28. void CSizeDlg::DoDataExchange(CDataExchange* pDX)
  29. {
  30.     CDialog::DoDataExchange(pDX);
  31.     //{{AFX_DATA_MAP(CSizeDlg)
  32.     DDX_Check(pDX, IDC_CHECK_MULTICOL, m_multicol);
  33.     DDX_Check(pDX, IDC_CHECK_SIZECELL, m_sizecell);
  34.     DDX_Control(pDX, IDC_SGCTRL1, m_ctrl);
  35.     //}}AFX_DATA_MAP
  36. }
  37.  
  38.  
  39. BEGIN_MESSAGE_MAP(CSizeDlg, CDialog)
  40.     //{{AFX_MSG_MAP(CSizeDlg)
  41.     ON_BN_CLICKED(IDC_CHECK_MULTICOL, OnCheckMulticol)
  42.     ON_BN_CLICKED(IDC_CHECK_SIZECELL, OnCheckSizecell)
  43.     //}}AFX_MSG_MAP
  44. END_MESSAGE_MAP()
  45.  
  46. /////////////////////////////////////////////////////////////////////////////
  47. // CSizeDlg message handlers
  48.  
  49. void CSizeDlg::OnCheckMulticol() 
  50. {
  51.     // TODO: Add your control notification handler code here
  52.     UpdateData();
  53.     m_ctrl.SetMultiColSizeMode(m_multicol);
  54. }
  55.  
  56. void CSizeDlg::OnCheckSizecell() 
  57. {
  58.     // TODO: Add your control notification handler code here
  59.     UpdateData();
  60.     m_ctrl.SetAllowSizeCell(m_sizecell);
  61. }
  62.  
  63. BOOL CSizeDlg::OnInitDialog() 
  64. {
  65.     CDialog::OnInitDialog();
  66.     
  67.     // TODO: Add extra initialization here
  68.     m_ctrl.SetPageLabelVisible( FALSE );
  69.     COleVariant var( "VCDEMO" );
  70.     m_ctrl.DoSetMessageTitle( var );
  71.  
  72.     return TRUE;  // return TRUE unless you set the focus to a control
  73.                   // EXCEPTION: OCX Property Pages should return FALSE
  74. }
  75.